/**
 * @(#) IncomeReportProxy.as
 *
 * @date		2010. 01. 14.
 * @version		1.0
 * @author		Goo,Sang Hoi
 * @description	 연말정산  - Proxy
 * 				소득공제 신고서 출력
 */
package com.skt.common_hr.yearadjustment.model
{

	import com.skt.common_hr.common.puremvc.CommonProxy;
	import com.skt.common_hr.yearadjustment.YearAdjustmentFacade;
	import com.skt.common_hr.yearadjustment.model.vo.CompanyReportVO;
	import com.skt.common_hr.yearadjustment.model.vo.EmployeeReportVO;
	import com.skt.common_hr.yearadjustment.model.vo.FamilyReportVO;
	import com.skt.common_hr.yearadjustment.model.vo.IncomeReportVO;
	import com.skt.common_hr.yearadjustment.model.vo.PnsReportVO;
	import com.wcl.utils.StringUtil;
	
	import mx.collections.ArrayCollection;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	

	public class IncomeReportProxy extends CommonProxy
	{
		public static const NAME:String = "IncomeReportProxy";
		public var msgStr:String;
		public var errCode:int;
		public var errText:String;
		public var url:String;
		
		[Bindable] public var myInfo:ArrayCollection = new ArrayCollection();
		[Bindable] public var myFamily:ArrayCollection = new ArrayCollection();
		[Bindable] public var myEmployee:ArrayCollection = new ArrayCollection();
		[Bindable] public var myCompany:ArrayCollection = new ArrayCollection();
		[Bindable] public var myPNS1:ArrayCollection = new ArrayCollection();
		[Bindable] public var myPNS2:ArrayCollection = new ArrayCollection();
		[Bindable] public var myPNS3:ArrayCollection = new ArrayCollection();
		[Bindable] public var myPNS4:ArrayCollection = new ArrayCollection();

		/**
		 * 생성자
		 * 
		 * @param
		 * @return void
		 */
		public function IncomeReportProxy(data:Object=null)
		{
			super(NAME, data);
		}
		
		
		/**
		 * data load를 수행
		 * 		- DataLoader 를 생성하고 Import Parameter 객체를 생성, RFC를 호출
		 * 
		 * @param pernr 사번
		 * @return void
		 */
		public function load(pernr:String, year:String):void
		{
			//CursorManager.setBusyCursor();
			//var loader:IDataLoader = DataLoaderFactory.getDataLoader("Z_HR_YEA_INCOME_DEDUCT");
			
			var param:Object = new Object();

			param["I_PERNR"] = pernr;
			param["I_YEAR"] = year;

			
			loadData("Z_HR_YEA_INCOME_DEDUCT", param, result, fault);
		}
		
		///////////////////////////////////////////////////////////////////////////////////////////////////
		//
		//	Event Listeners
		//
		///////////////////////////////////////////////////////////////////////////////////////////////////
		/**
		 * 서버에서 정상적으로 리턴된 결과를 처리
		 * 
		 * @param
		 * @return void
		 */
		public function result(event:ResultEvent):void
		{
			/* if(retCode==0) {  
				trace( "suss to load Income Report proxy");

				myInfo = parseMyInfo(event.result.ITAB);
				myFamily = parseMyFamily(event.result.I_FAMILY); 
				myEmployee = parseMyEmployee(event.result.I_EMPLOYEE);
				myCompany = parseMyCompany(event.result.I_COMPANY);
				myPNS1 = parseMyPNS(event.result.I_PNS1);
				myPNS2 = parseMyPNS(event.result.I_PNS2);
				myPNS3 = parseMyPNS(event.result.I_PNS3);
				myPNS4 = parseMyPNS(event.result.I_PNS4);
				facade.sendNotification(YearAdjustmentFacade.LOAD_INCOME_REPORT_COMPLETE, this);
			}
			else {
				trace( "failed to load Incomde Report: (" +event.result["RETCODE"] + ") "+event.result["RETTEXT"]);
				msgStr = event.result["RETTEXT"];
				facade.sendNotification(YearAdjustmentFacade.LOAD_INCOME_REPORT_FAILED, this);
			} */
			errCode = event.result["RETCODE"];
			errText = event.result["RETTEXT"];
			msgStr = event.result["RETTEXT"];
			
			if(event.result["RETCODE"]==0) {
				url = StringUtil.NVL(event.result["O_PATH"]);
				facade.sendNotification(YearAdjustmentFacade.LOAD_INCOME_REPORT_COMPLETE, this);
			}
			else {
				trace( "failed to 정산전표 URL");
				url = "";
				facade.sendNotification(YearAdjustmentFacade.LOAD_INCOME_REPORT_FAILED, this);
			}
		}
		
		/**
		 * 서버에서 오류가 발생했을 처리
		 * 
		 * @param
		 * @return void
		 */
		private function fault(event:FaultEvent):void
		{
//			trace("Fault message in Income Report: " + event.fault.faultString);
//			msgStr = event.fault.faultString;
//			facade.sendNotification(YearAdjustmentFacade.LOAD_INCOME_REPORT_FAILED, this);
			
			trace(event.fault.faultString);
			errCode = -1;
			errText = "호출실패";
			url = "";
			facade.sendNotification(YearAdjustmentFacade.LOAD_INCOME_REPORT_FAILED, this);
		}
			
		///////////////////////////////////////////////////////////////////////////////////////////////////
		//
		//	Data Parsing functions
		//
		///////////////////////////////////////////////////////////////////////////////////////////////////
		
		/**
		 * 근로자 본인  정보
		 * 
		 * @param
		 * @return 근로자 본인 정보  Value Object
		 */
		private function parseMyInfo(arr:ArrayCollection):ArrayCollection
		{
			var returnArr:ArrayCollection = new ArrayCollection();
			for each(var rec:Object in arr){
				var vo:IncomeReportVO = new IncomeReportVO();
				
				//2012.0104 주택임차차입금, 장기주택저당차입금 수정
				vo.DED_PAID_01 = rec["DED_PAID_01"];
				vo.DED_PAID_02 = rec["DED_PAID_02"];
				
				vo.DED_LOAN_01 = rec["DED_LOAN_01"];
				vo.DED_LOAN_02 = rec["DED_LOAN_02"];
				vo.DED_LOAN_03 = rec["DED_LOAN_03"];
				
				
				vo.PERNR		= parseInt(rec["PERNR"]).toString();
				vo.TOT_PERS		= rec["TOT_PERS"];
				vo.TOT_NTINS	= rec["TOT_NTINS"];	
				vo.TOT_OTINS	= rec["TOT_OTINS"];	
				vo.TOT_NTMED	= rec["TOT_NTMED"];	
				vo.TOT_OTMED	= rec["TOT_OTMED"];	
				vo.TOT_NTEDU	= rec["TOT_NTEDU"];	
				vo.TOT_OTEDU	= rec["TOT_OTEDU"];	
				vo.TOT_NTCRE	= rec["TOT_NTCRE"];	
				vo.TOT_OTCRE	= rec["TOT_OTCRE"];	
				vo.TOT_NTDBT	= rec["TOT_NTDBT"];	
				vo.TOT_OTDBT	= rec["TOT_OTDBT"];	
				vo.TOT_NTCAS	= rec["TOT_NTCAS"];	
				vo.TOT_OTCAS	= rec["TOT_OTCAS"];	
				vo.TOT_NTDON	= rec["TOT_NTDON"];	
				vo.TOT_OTDON	= rec["TOT_OTDON"];	
				vo.TOT_MULNO	= rec["TOT_MULNO"];	
				vo.TOT_BASNO	= rec["TOT_BASNO"];	
				vo.TOT_WOMNO	= rec["TOT_WOMNO"];	
				vo.TOT_AGENO	= rec["TOT_AGENO"];	
				vo.TOT_ADONO	= rec["TOT_ADONO"];	
				vo.TOT_HANNO	= rec["TOT_HANNO"];	
				vo.TOT_CLDNO	= rec["TOT_CLDNO"];
				
				vo.EE_DPTID = rec["EE_DPTID"];
				vo.EE_WOMEE = rec["EE_WOMEE"];
				vo.EE_HNDID = rec["EE_HNDID"];
				vo.EE_OLDID = rec["EE_OLDID"];
				vo.EE_CHDID = rec["EE_CHDID"];
				vo.EE_RELCO	= rec["EE_RELCO"];
				vo.EE_NATIO	= rec["EE_NATIO"];
				vo.EE_FNAME	= rec["EE_FNAME"];
				vo.EE_REGNO	= rec["EE_REGNO"];
				vo.EE_DPTID	= rec["EE_DPTID"];
				vo.EE_WOMEE	= rec["EE_WOMEE"];
				vo.EE_HNDID	= rec["EE_HNDID"];
				vo.EE_OLDID	= rec["EE_OLDID"];
				vo.EE_CHDID	= rec["EE_CHDID"];
				vo.EE_NTINS	= rec["EE_NTINS"];
				vo.EE_OTINS	= rec["EE_OTINS"];
				vo.EE_NTMED	= rec["EE_NTMED"];
				vo.EE_OTMED	= rec["EE_OTMED"];
				vo.EE_NTEDU	= rec["EE_NTEDU"];
				vo.EE_OTEDU	= rec["EE_OTEDU"];
				vo.EE_NTCRE	= rec["EE_NTCRE"];
				vo.EE_OTCRE	= rec["EE_OTCRE"];
				vo.EE_NTDBT	= rec["EE_NTDBT"];
				vo.EE_OTDBT	= rec["EE_OTDBT"];
				vo.EE_NTCAS	= rec["EE_NTCAS"];
				vo.EE_OTCAS	= rec["EE_OTCAS"];
				vo.EE_NTDON	= rec["EE_NTDON"];
				vo.EE_OTDON	= rec["EE_OTDON"];
				
				// 연금보험료
				vo.NP_PRV		= rec["NP_PRV"];
				vo.DED_NP_PRV	= rec["NP_PRV"];
				vo.NP_CUR		= rec["NP_CUR"];
				vo.DED_NP_CUR	= rec["DED_NP_CUR"];		
				vo.OP_PRV		= rec["OP_PRV"];	
				vo.DED_OP_PRV	= rec["DED_OP_PRV"];
				vo.OP_CUR		= rec["OP_CUR"];	
				vo.DED_OP_CUR	= rec["DED_OP_CUR"];		
				vo.RP_PRV		= rec["RP_PRV"];	
				vo.DED_RP_PRV	= rec["DED_RP_PRV"];
				vo.RP_CUR		= rec["RP_CUR"];
				vo.DED_RP_CUR	= rec["DED_RP_CUR"];		
				vo.TOTAL_PEN	= rec["TOTAL_PEN"];
				vo.DED_TOTAL_PEN= rec["DED_TOTAL_PEN"];
				
				// 보험료
				vo.MED_INS_PRV	= rec["MED_INS_PRV"];	//국민건강보험 - 종전
				vo.DED_MED_PRV	= rec["DED_MED_PRV"];	//국민건강보험 - 종전  - 공제액
				vo.MED_INS_CUR	= rec["MED_INS_CUR"]; 	//국민건강보험 - 주현
				vo.DED_MED_CUR	= rec["DED_MED_CUR"]; 	//국민건강보험 - 주현 - 공제액
				vo.DED_EI_PRV	= rec["DED_EI_PRV"];	//고용보험 - 종전
				vo.P12			= rec["P12"];			//고용보험 - 종전  - 공제액
				vo.DED_EI_CUR	= rec["DED_EI_CUR"];	//고용보험 - 주현 
				vo.Y44			= rec["Y44"];			//고용보험 - 주현 - 공제액
				vo.DED_SI		= rec["DED_SI"];		//일반보장성보험
				vo.Y4A			= rec["Y4A"];			//일반보장성보험 - 공제액
				vo.DED_SI_DIS	= rec["DED_SI_DIS"];	//장애인전용보장성보험
				vo.Y4B			= rec["Y4B"];			//장애인전용보장성보험 - 공제액
				vo.DED_SI_TOT	= rec["DED_SI_TOT"];	// 보험료 계
				vo.Y4C			= rec["Y4C"];			// 보험료 계 - 공제액


				//의료비
				vo.Y4E	= rec["Y4E"];					//본인 의료비
				vo.DED_MED_AGED	= rec["DED_MED_AGED"];	//본인 의료비 - 공제액
				vo.Y4F	= rec["Y4F"];					//그 밖의 공제대상자 의료비
				vo.DED_MED_DEP	= rec["DED_MED_DEP"];	//그 밖의 공제대상자 의료비- 공제액
				
				vo.DED_MED_TOT	= rec["DED_MED_TOT"];	//의표비 계
				vo.Y4H			= rec["Y4H"];			//의표비 계- 공제액

	          	 //* 교육비
				vo.DED_EDU_EE = rec.DED_EDU_EE;		// 소득자 본인 공납금
				vo.Y4K 		= rec.Y4K;				// 소득자 본인 공납금 - 공제액

				vo.DED_ELM_PER = rec.DED_ELM_PER;	//취학전 아동 인원수
				vo.DED_EDU_ELM	= rec.DED_EDU_ELM;	//취학전 아동 (유치원비, 학원비등)
				vo.Y4O			= rec.Y4O;			//취학전 아동 (유치원비, 학원비등) - 공제액

				vo.DED_STU_PER 	= rec.DED_STU_PER;	//초,중,고등학교 인원수
				vo.DED_EDU_STU 	= rec.DED_EDU_STU;	//초,중,고등학교 공납금
				vo.Y4P			= rec.Y4P			//초,중,고등학교 공납금 - 공제액

				vo.DED_UNI_PER 	= rec.DED_UNI_PER;	//대학생  인원수
				vo.DED_EDU_UNI	= rec.DED_EDU_UNI;	//대학생  공납금
				vo.Y4Q			= rec.Y4Q;			//대학생  공납금 - 공제액

				vo.DED_DIS_PER 	= rec.DED_DIS_PER;	//장애인 인원수
				vo.DED_EDU_DIS 	= rec.DED_EDU_DIS;	//장애인 특수교육비
				vo.Y4J 			= rec.Y4J;			//장애인 특수교육비 - 공제액

				vo.DED_EDU_TOT = rec.DED_EDU_TOT;	//교육비 계
				vo.Y4M 			= rec.Y4M;			//교육비 계 - 공제액
				

	          	// 주택자금
				vo.DED_HOUS_PAID = rec.DED_HOUS_PAID;	//주택임차차입금
				vo.Y5L = rec.Y5L;						//주택임차차입금- 공제액
				vo.DED_RENT_FEE = rec.DED_RENT_FEE;		//월세액 
				vo.Y68 = rec.Y68;						//월세액 - 공제액
				vo.DED_HOUS_LOAN = rec.DED_HOUS_LOAN;	//장기주택저당차입금  
				vo.Y54 = rec.Y54;						//장기주택저당차입금  - 공제액
				
				vo.Y5L_Y54_TOT = rec.Y5L_Y54_TOT;		//주택자금 공제액 계 
	          	
	          	//기부금
				vo.DED_DONA_POLI = rec.DED_DONA_POLI;	//정치자금 기부금(세액공제분제외)
				vo.DED_DONA_100 = rec.DED_DONA_100;		//법정 기부금 
				vo.Y5N 			= rec.Y5N;				//법정 기부금   - 공제액
				vo.DED_DONA_SPETC = rec.DED_DONA_SPETC;	//특례기부금(공익법인신탁 제외)
				vo.Y5V 			= rec.Y5V;				//특례기부금(공익법인신탁 제외)   - 공제액
				vo.DED_DONA_PC = rec.DED_DONA_PC;		//공익법인신탁 특례기부금 
				//vo.Y58 			= rec.Y58;				//공익법인신탁 특례기부금    - 공제액
				vo.DED_DONA_30 	= rec.DED_DONA_30;		//우리사주조합 기부금 
				vo.Y5Y 			= rec.Y5Y;				//우리사주조합 기부금     - 공제액
				vo.DED_DONA_DESIG = rec.DED_DONA_DESIG;	//종교단체외 지정 기부금
				vo.DED_DONA_RELIG = rec.DED_DONA_RELIG;	//종교단체 지정 기부금

				vo.Y5S				= rec.Y5S;			//기부금공제액 계
				
				vo.DED_DONA_50 = rec.DED_DONA_50;		//50%한도 적용기부금
	          	
	          	
	          	/**
	          	 * 그 밖의 공제 - 연금저축공제
	          	 */
				
				vo.DED_PERS_P_B = rec.DED_PERS_P_B;	//2000년 이전 가입한 개인연금저축
				vo.Y6I 			= rec.Y6I;			//2000년 이전 가입한 개인연금저축 -공제액
				vo.DED_PERS_P_A = rec.DED_PERS_P_A;	//2001년 이후 가입한 연금저축
				vo.Y6Q 			= rec.Y6Q;			//2001년 이후 가입한 연금저축 - 공제액
				vo.Y6Q_Y6I_TOT	= rec.Y6Q_Y6I_TOT;			//연금저축공제 계 
				
				vo.DED_BIZ_FUND = rec.DED_BIZ_FUND;		//소기업, 소상공인 공제부금 소득공제			
				vo.Y7U 			= rec.Y7U;				//소기업, 소상공인 공제부금 소득공제		
				
				vo.DED_HOUS_SAV_01 = rec.DED_HOUS_SAV_01;	//청약저축 
				vo.DED_HOUS_SAV_04 = rec.DED_HOUS_SAV_04;	//근로자주택마련저축 
				vo.DED_HOUS_SAV_02 = rec.DED_HOUS_SAV_02;	//주택청약종합저축 
				vo.DED_HOUS_SAV_03 = rec.DED_HOUS_SAV_03;	//장기주택마련저축 
				vo.DED_HOUS_SAV	 	= rec.DED_HOUS_SAV;		//주택마련저축 소득공제 계 
				vo.Y5E	 			= rec.Y5E;				//주택마련저축 소득공제 계 
				
				//투자조합 출자공제 
				vo.INVEST_01 = rec.INVEST_01;			//2008년 이전 출자ㆍ투자분 
				vo.INVEST_02 = rec.INVEST_02;			//2009년 이후 출자ㆍ투자분 
				vo.INVESTMENT = rec.INVESTMENT;			//투자조합 출자공제- 출자 또는 투자
				vo.DED_INVEST = rec.DED_INVEST;			//투자조합 출자공제- 출자 또는 투자
				
				vo.DED_CARD_01 = rec.DED_CARD_01;			//신용카드 
				vo.DED_CARD_02 = rec.DED_CARD_02;			//직불카드
				vo.DED_CRED_CASH = rec.DED_CRED_CASH;		//③ 현금영수증 
				vo.DED_CRED_EXP = rec.DED_CRED_EXP;			//④ 학원비 지로납부 
				vo.CRED_EXP_TOTAL = rec.CRED_EXP_TOTAL;		//계(①+②+③+④)  
				vo.DED_CREDIT 	= rec.DED_CREDIT;		//계(①+②+③+④)   - 공제
				
				vo.DED_EE_STOCK = rec.DED_EE_STOCK;		//우리사주 출연금
				vo.Y6D 			= rec.Y6D;				//우리사주 출연금


	          	/**
	          	 * 그 밖의 공제 - 장기주식형 저축  소득공제
	          	 */
				vo.DED_LTSF1 = rec.DED_LTSF1;				//납입 1년차 
				vo.DED_LTSF2 = rec.DED_LTSF2;				//납입 2년차
				vo.DED_LTSF3 = rec.DED_LTSF3;				//납입 3년차
				vo.TOTAL_LTSF = rec.TOTAL_LTSF;				//납입 합계
				vo.Y7W 		 = rec.Y7W;							//납입 합계
				vo.DED_JKDED = rec.DED_JKDED;				//고용유지 중소기업 소득공제
				vo.Y78		 = rec.Y78;						//고용유지 중소기업 소득공제
				
				
				
				vo.PRE_TAX_ABPAY = rec.PRE_TAX_ABPAY;		//국외원천소득 
				vo.PRE_TAX_FORCT = rec.PRE_TAX_FORCT;		//납세액(외화)
				vo.PRE_TAX_KORCR = rec.PRE_TAX_KORCR;		//납세액(원화)
				vo.PRE_TAX_PAID	= rec.PRE_TAX_PAID;			//납세국명
				vo.FRN_TAX_APP	= rec.FRN_TAX_APP;			//납부일 
				vo.PRE_TAX_DATE	= rec.PRE_TAX_DATE;			//신청서제출일 
				vo.FRN_TAX_WP	= rec.FRN_TAX_WP;			//국외근무처 
				vo.PRE_TAX_DURA	= rec.PRE_TAX_DURA;			//근무기간
				vo.FRN_TAX_JOB	= rec.FRN_TAX_JOB;			//근무기간
				
	          	//주택자금 차입금 이자 세액공제
	          	vo.TAX_HOME_INT = rec.TAX_HOME_INT;		//이자상환액 
	          	vo.Y7G = rec.Y7G;						//30%
				
				//기부정치자금 
				vo.POL_DON = rec.POL_DON;			//10만원 이하 
				vo.Y7N = rec.Y7N;	 				//100/110 
	
	
				vo.SYS_DATE = rec.SYS_DATE;

				//신고인 성명
				
	          	/**
	          	 * 세액 공제 - 외국인 근로자
	          	 */
	          	 //입국목적
	          	//vo.FRN_MUTUAL			//정부간 협약 
	          	//vo.FRN_TAX		//기술도입계약
	          	//vo.FRN_TAX_EMPT		//조세특례제한법」상 감면 
	          	
	          	//vo.FRN_TAX_BEGIN		//기술도입계약 또는 근로제공일 
	          	//vo.FRN_TAX_ENDDA		//감면기간만료일 
				vo.FRN_RED_RECV  = rec.FRN_RED_RECV;	//외국인근로소득에 대한 감면신청서 
				vo.FRN_RED_SUBM  = rec.FRN_RED_SUBM;	//제출일 
				
				vo.SYS_DATE = rec.SYS_DATE;			// 신고일



				
				vo.FLAT_RATE = rec.FLAT_RATE;				//외국인 근로자 단일세율적용신청서 제출여부 
				vo.DED_PRV_COMNM = rec.DED_PRV_COMNM;		//종(전) 근무자명
				vo.DED_PRV_REGNO = rec.DED_PRV_REGNO;		//사업자등록번호
				vo.DED_TOT_SALAR = rec.DED_TOT_SALAR;		//종(전)급여총액
				vo.DED_PRV_TAX = rec.DED_PRV_TAX;		//종(전)결정세액
				vo.PRV_RECEIPT = rec.PRV_RECEIPT;			//종(전)근무지 근로소득원천 징수 영수증 제출여부
				
				vo.PEN_SAV_INDIC = rec.PEN_SAV_INDIC;
				vo.MED_INDIC = rec.MED_INDIC;
				if(StringUtil.trim(vo.MED_INDIC) == "")  {
					vo.MED_INDIC = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
				}
				vo.DON_INDIC = rec.DON_INDIC;
				if(StringUtil.trim(vo.DON_INDIC) == "")  {
					vo.DON_INDIC = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
				}

				returnArr.addItem(vo);
			}
			
			return returnArr;
		}

		/**
		 * 근로자 가족  정보
		 * 
		 * @param
		 * @return 근로자 가족 정보  Value Object
		 */
		private function parseMyFamily(arr:ArrayCollection):ArrayCollection
		{
			var returnArr:ArrayCollection = new ArrayCollection();
			for each(var rec:Object in arr){
				var vo:FamilyReportVO = new FamilyReportVO();
				
				vo.PERNR	= rec["PERNR"];
				vo.SEQNO	= rec["SEQNO"];
				vo.RELCO	= rec["RELCO"];
				vo.NATIO	= rec["NATIO"];
				vo.FNAME	= rec["FNAME"];
				vo.REGNO	= rec["REGNO"];
				vo.DPTID	= rec["DPTID"];
				vo.WOMEE	= rec["WOMEE"];
				vo.HNDID	= rec["HNDID"];
				vo.OLDID	= rec["OLDID"];
				vo.CHDID	= rec["CHDID"];
				vo.MULID	= rec["MULID"];
				vo.BACHD	= rec["BACHD"];
				vo.NTINS	= rec["NTINS"];
				vo.OTINS	= rec["OTINS"];
				vo.NTMED	= rec["NTMED"];
				vo.OTMED	= rec["OTMED"];
				vo.NTEDU	= rec["NTEDU"];
				vo.OTEDU	= rec["OTEDU"];
				vo.NTCRE	= rec["NTCRE"];
				vo.OTCRE	= rec["OTCRE"];
				vo.NTDBT	= rec["NTDBT"];
				vo.OTDBT	= rec["OTDBT"];
				vo.NTCAS	= rec["NTCAS"];
				vo.OTCAS	= rec["OTCAS"];
				vo.NTDON	= rec["NTDON"];
				vo.OTDON	= rec["OTDON"];
				
				returnArr.addItem(vo);
			}
			
			return returnArr;
		}

		/**
		 * 근로자 근무  정보
		 * 
		 * @param
		 * @return 근로자 근무 정보  Value Object
		 */
		private function parseMyEmployee(arr:ArrayCollection):ArrayCollection
		{
			var returnArr:ArrayCollection = new ArrayCollection();
			for each(var rec:Object in arr){
				var vo:EmployeeReportVO = new EmployeeReportVO();

				vo.TEL		= rec["TEL"];
				
				vo.PERNR	= parseInt(rec["PERNR"]).toString();
				vo.REGNO	= rec["REGNO"];
				vo.ENAME	= rec["ENAME"];
				vo.ADDRE	= rec["ADDRE"];
				vo.BEGDA	= rec["BEGDA"];
				vo.ENDDA	= rec["ENDDA"]
				vo.EX_BEGDA	= StringUtil.trim(rec["EX_BEGDA"]);
				vo.EX_ENDDA	= StringUtil.trim(rec["EX_ENDDA"]);
				vo.SIGNATURE= rec["SIGNATURE"];
				vo.PERNRC	= rec["PERNRC"];
				vo.ORGTXC	= rec["ORGTXC"];
				vo.RESIDENT	= rec["RESIDENT"];
				vo.NON_RES	= rec["NON_RES"];
				vo.STATE	= rec["STATE"];
				vo.STCOD	= rec["STCOD"]
				
				vo.HSHLD	= StringUtil.trim(rec["HSHLD"]); 
				vo.N_HSHLD	= rec["N_HSHLD"]
				vo.COUNTRY	= rec["COUNTRY"]
				vo.CURCD	= rec["CURCD"]
				vo.PDCHG	= rec["PDCHG"]
				vo.N_PDCHG	= rec["N_PDCHG"]
 
 				returnArr.addItem(vo);
			}
			
			return returnArr;
		}

		/**
		 * 근로자 회사 정보
		 * 
		 * @param
		 * @return 근로자 회사 정보  Value Object
		 */
		private function parseMyCompany(arr:ArrayCollection):ArrayCollection
		{
			var returnArr:ArrayCollection = new ArrayCollection();
			for each(var rec:Object in arr){
				var vo:CompanyReportVO = new CompanyReportVO();

				vo.AG_TELNR	= rec["AG_TELNR"];
				vo.PERNR	= rec["PERNR"];
				vo.COMNM	= rec["COMNM"];
				vo.STCD2	= rec["STCD2"];
				vo.STCD1	= rec["STCD1"];
				vo.ADDRESS_LINE = rec["ADDRESS_LINE"];
				returnArr.addItem(vo);
			}
			
			return returnArr;
		}
		
		
		/**
		 * 연금,저축 등 소득공제명세서(PNS_TAB)
		 * 
		 * @param
		 * @return Value Object
		 */
		private function parseMyPNS(arr:ArrayCollection):ArrayCollection
		{
			var returnArr:ArrayCollection = new ArrayCollection();
			for each(var rec:Object in arr){
				var vo:PnsReportVO = new PnsReportVO();

				vo.SUBT	= rec["SUBT"];
				vo.PNST	= rec["PNST"];
				vo.INSN	= rec["INSN"];
				vo.ACCN	= rec["ACCN"];
				vo.AMTP = rec["AMTP"];
				vo.AMNT = rec["AMNT"];
				vo.AMTD	= rec["AMTD"];

				returnArr.addItem(vo);
			}
			
			return returnArr;
		}
		
		
		
	}
}